package com.ins.service.impl;


import com.ins.common.utils.SecureUser;
import com.ins.mapper.AppAutMapper;
import com.ins.model.dto.app.AppAutDTO;
import com.ins.model.entity.AppAut;
import com.ins.service.AppAutService;
import com.mybatisflex.spring.service.impl.ServiceImpl;
import lombok.RequiredArgsConstructor;
import org.dromara.hutool.core.bean.BeanUtil;
import org.springframework.stereotype.Service;

/**
 * 认证记录 服务层实现。
 *
 * @author ins
 * @since 2024-05-14
 */
@Service
@RequiredArgsConstructor
public class AppAutServiceImpl extends ServiceImpl<AppAutMapper, AppAut> implements AppAutService {


    @Override
    public Boolean submit(AppAutDTO dto) {
        //调用验证接口

        AppAut aut = AppAut.of();
        BeanUtil.copyProperties(dto, aut);
        aut.setUserId(SecureUser.getUserId());
        return aut.save();
    }
}